package jmt.gui.jmodel.JGraphMod;

import org.jgraph.graph.Port;

import jmt.gui.jmodel.controller.Mediator;

/**
 * 
 * @author Riccardo Pinciroli
 *
 */

public class EnergyOptimizerCell extends JmtCell {
	
	private static final long serialVersionUID = 1L;

	// Disables this component
	public static final boolean canBePlaced = true;

	// Do not change this as it is accessed by reflection to forecast new cell dimensions (Bertoli Marco)
	public static final String ICON = Mediator.advanced ? "bc" : "EnergyOptimizer";
	
	/**
	 * Creates a graph cell and initializes it with the specified user object.
	 *
	 * @param userObject an Object provided by the user that constitutes
	 *                   the cell's data
	 */
	public EnergyOptimizerCell(Object userObject) {
		super(EnergyOptimizerCell.ICON, userObject);
		type = 9;
	}
	
	/**creats the ports for this vertex
	 *
	 * @return array of ports
	 */
	@Override
	public Port[] createPorts() {
		Port[] ports = new Port[2];
		ports[0] = new InputPort(this);
		ports[1] = new OutputPort(this);
		return ports;
	}

	/**
	 * Returns the name of the icon of this cell
	 *
	 * @return the name of the icon of this cell
	 */
	@Override
	public String getIcon() {
		return ICON;
	}
}